<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                template="/templates/ui.xhtml">

    <ui:define name="head">
        <script type="text/javascript">
            function doPopupWindow(source) {
                popupwindow = window.open("", "popupwindow", "height=600,width=800,left=200,top=100,toolbar=no,menubar=no,scrollbars=yes,location=no");
                popupwindow.focus;
                document.getElementById("hidden:go").onclick(null);
            }
            function doPopupOperWindow(source) {
                popupoperwindow = window.open("", "popupoperwindow", "height=250,width=400,left=400,top=300,toolbar=no,menubar=no,scrollbars=no,location=no");
                popupoperwindow.focus;
                document.getElementById("hidden1:go1").onclick(null);
            }

        </script>
        <style type="text/css">
            .col-label {
                width: 70px;
            }

            .col-input {
                width: 120px;
            }

            .col-input-200 {
                width: 300px;
            }


        </style>

    </ui:define>

    <ui:define name="content">
        <div style="margin:5px">
            <p:tabView style="font-weight:normal;font-style:normal">
                <p:tab title="授权支付成功处理">
                    <p:growl id="qrymsgs" showDetail="false"/>

                    <div id="qrytable">
                        <h:form id="qryform">
                            <p:menubar>
                                <p:menuitem type="push" value="多笔确认成功处理" icon="ui-icon ui-icon-gear"
                                            action="#{payVchMngAction.onAdd}" update="qrymsgs, qrypdt"
                                            ajax="false"/>
                                <p:menuitem type="push" value="导出记录" icon="ui-icon ui-icon-gear"
                                            action="#{payVchMngAction.onPrintDeletedRecord}" update="msgs, pdt"/>
                            </p:menubar>
                            <p:ajaxStatus style="height:18px;text-align:center">
                                <f:facet name="start">
                                    <h:graphicImage value="/images/ajaxloadingbar.gif"/>
                                </f:facet>
                                <f:facet name="complete">
                                    <h:outputText value=""/>
                                </f:facet>
                            </p:ajaxStatus>
                            <p:dataTable id="qrypdt" dynamic="true"
                                         value="#{payVchMngAction.detlList}" var="record"
                                         paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                                         paginator="true" rows="15" paginatorPosition="bottom"
                                         rowsPerPageTemplate="100,50,30,15,5"
                                         emptyMessage="数据记录为空...">
                                <ui:include src="common/payVoucherList.xhtml">
                                    <ui:param name="backBean" value="#{payVchMngAction}"/>
                                </ui:include>
                                <p:column headerText="确认成功" style="width:70px;text-align:center">
                                    <p:commandLink style="color:blue;" value="确认成功" update="popupwindow"
                                                   oncomplete="doPopupOperWindow(this);return false;">
                                        <f:setPropertyActionListener value="#{record}"
                                                                     target="#{payVchMngAction.selectedRecord}"/>
                                    </p:commandLink>
                                </p:column>
                            </p:dataTable>
                        </h:form>
                    </div>
                </p:tab>
                <p:tab title="本日已确认成功记录清单">
                    <div id="table">
                        <h:form id="form">
                            <p:dataTable id="pdt" dynamic="true"
                                         value="#{payVchMngAction.returnedDetlList}" var="record"
                                         selection="#{payVchMngAction.selectedRecords}"
                                         paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                                         paginator="true" rows="15" paginatorPosition="bottom"
                                         rowsPerPageTemplate="100,50,30,15,5"
                                         emptyMessage="数据记录为空...">
                                <ui:include src="common/payVoucherList.xhtml">
                                    <ui:param name="backBean" value="#{payVchMngAction}"/>
                                </ui:include>
                            </p:dataTable>
                        </h:form>
                    </div>
                </p:tab>
            </p:tabView>
        </div>
        <h:form id="hidden" target="popupwindow">
            <h:commandLink id="go" actionListener="#{payVchMngAction.showDetailListener}"
                           action="#{payVchMngAction.onShowDetail}">
                <f:attribute name="pkid" value="#{payVchMngAction.selectedRecord.pkid}"/>
            </h:commandLink>
        </h:form>
                <h:form id="hidden1" target="popupoperwindow">
            <h:commandLink id="go1" actionListener="#{payVchMngAction.showDetailListener}"
                           action="#{payVchMngAction.onShowOperDetail}">
                <f:attribute name="pkid" value="#{payVchMngAction.selectedRecord.pkid}"/>
            </h:commandLink>
        </h:form>
    </ui:define>

</ui:composition>